package com.vegetable.modules.entity.stock;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Date;

/**
 * <p>
 * 库存表
 * </p>
 *
 * @author wangruijie
 * @since 2024-03-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Stock统计对象", description="库存统计表")
public class StockStatistics implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商品ID")
    private Long commodityId;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "商品编码")
    private String commonCode;

    @ApiModelProperty(value = "商品类型ID")
    private Long commodityTypeId;

    @ApiModelProperty(value = "商品类型名称")
    private String commodityTypeName;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "规格ID")
    private Long specsId;

    @ApiModelProperty(value = "规格名称")
    private String specsName;

    @ApiModelProperty(value = "商品标签(0原料，1半成品，2成品，3材料)")
    private Integer tag;

    @ApiModelProperty(value = "标准")
    private BigDecimal standard;

    @ApiModelProperty(value = "入库数量")
    private BigDecimal inNumber;

    @ApiModelProperty(value = "入库成本")
    private BigDecimal inCost;

    @ApiModelProperty(value = "出库数量")
    private BigDecimal outNumber;

    @ApiModelProperty(value = "出库成本")
    private BigDecimal outCost;

    @ApiModelProperty(value = "初始数量")
    private Integer initialNumber;

    @ApiModelProperty(value = "初始成本")
    private BigDecimal initialCost;

    @ApiModelProperty(value = "结余数量")
    private Integer balanceNumber;

    @ApiModelProperty(value = "结余成本")
    private BigDecimal balanceCost;
}
